1. Field of the Invention
The present invention relates to a distance measuring apparatus and method for a camera and, more particularly, to a shortest range discrimination unit of an active distance measuring apparatus incorporated into a compact camera.
2. Related Background Art
An active distance measuring apparatus calculates the distance to an object of distance measurement by receiving reflected light of projected light by using a semiconductor position detecting device (to be referred to as a PSD hereinafter) and detecting the position of the reflected light (the barycenter of the reflected light) on the PSD on the basis of the signal output from the PSD.
In the active apparatus as described above, errors occur when the distances of contrast objects are measured. Therefore, a pair of sensor arrays such as charge-coupled devices (to be referred to as CCDs hereinafter) are arranged in parallel as light-receiving devices to receive reflected light of projected light. The distance to an object of distance measurement is obtained by the phase difference between pieces of image information from these sensor arrays.
One example will be described below with reference to FIG. 3.
FIG. 3 is a view for explaining the principle of an active phase difference detection type distance measuring apparatus in which sensor arrays are arranged in parallel. Referring to FIG. 3, a pair of sensor arrays 301 and 302 are CCDs, i.e., a first CCD 301 and a second CCD 302.
Light-receiving lenses 303 and 304 are arranged in parallel and apart from each other by a fixed baseline length B. An infrared light-emitting device (to be referred to as an iRED hereinafter) 305 is a light-projecting unit. A light-projecting lens 306 projects light onto an object 307 of distance measurement.
In FIG. 3, the distance from the principal points of the light-receiving lenses 303 and 304 to the first and second CCDs 301 and 203 is denoted by f, the distance from the principal points of the light-receiving lenses 303 and 304 to the object 307 is denoted by H, the distance between the principal points of the light-receiving lenses 303 and 304 is denoted by B, and the distance between the principal points of the light-projecting lens 306 and the light-receiving lens 303 is denoted by K.
The value x1 is the amount that the received optical image is displaced (moving amount) from the central position of reflected light returned from the object 307 if it was located at infinity and focused by the light-receiving lens 303 to form an image on the first CCD 301 to the central position of reflected light returned from the object 307 located at the distance H and focused by the light-receiving lens 303 to form an image on the first CCD 301.
Likewise, the value x2 is the amount that the received optical image is displaced (moving amount) from the central position of reflected light returned from the object 307 if it was located at infinity and focused by the light-receiving lens 304 to form an image on the first CCD 302, to the central position of reflected light returned from the object 307 located at the distance H and focused by the light-receiving lens 304 to form an image on the first CCD 302. On the basis of these values, the following relation holds. EQU H=(B.times.f)/(x2-x1) (1)
FIG. 4 explains the details of the first and second CCDs 301 and 302 in FIG. 3. Referring to FIG. 4, the first and second CCDs 301 and 302 are constituted by 20 pixels L1 to L20 and R1 to R20, respectively, and the pixel pitch is P. The distance from the left end of the pixel L1 to the left end of the pixel R1 is B which is equal to the distance between the light-receiving lenses 303 and 304.
Also, as shown in FIG. 4, predetermined continuous pixels are set as windows WL and WR in the first and second CCDS 301 and 302, respectively. (x2-x1) as the denominator on the right-hand side of equation (1) above is calculated by a method (by which one of the windows WL and WR is shifted bit by bit to obtain the correlation therebetween and the phase difference is calculated from the moving amount of the window at which this correlation takes the extreme) conventionally used in phase difference detection. In this manner the distance to the object 307 is obtained.
Recent compact cameras are being more and more downsized, and the distance measuring apparatuses are also being made more compact. This also shortens the sensor length of the first and second CCDs 301 and 302 described above. Consequently, at the shortest range (minimum distance) at which a camera cannot perform photographing, the received light spot of a light beam emitted from the light-projecting device 305 and reflected by the object 307 extends outside the sensor. This makes accurate discrimination of the shortest range impossible.
FIGS. 5A to 5D show the positional relationships between the first and second CCDS 301 and 302 and the received light spot when the object 307 is at different distances, and a pair of pieces of image information from the first and second CCDs 301 and 302 after analog-to-digital (A/D) conversion.
In FIG. 5A, the object is at a normal distance at which photographing is possible, and received light spots 1a and 2a are on the sensors of the first and second CCDs 301 and 302, respectively. Therefore, the coincidence of the pair of pieces of image information is high, so a reliable distance measurement result can be obtained.
In FIG. 5E, the object 307 is in the vicinity of the photographing limit on the short distance side. Accordingly, although a received light spot 1e is on the sensor of the first CCD 301, a received light spot 2e partially extends outside the sensor of the second CCD 302. Consequently, the coincidence of the pair of pieces of image information is lower than that in FIG. 5A. However, a distance measurement result having reliability to a certain degree can be obtained.
In FIGS. 5B and 5C, the object 307 is at the shortest range at which no photographing is possible. In these cases, most of the received light spot incident on the second CCD 302 extends outside the sensor of the second CCD 302, and this lowers the coincidence of the pair of pieces of image information. Consequently, only distance measurement results with low reliability can be obtained. Therefore, the shortest range cannot be easily discriminated from the results of the phase difference detection.
In the distance measuring apparatus as shown in FIG. 3, when the distance to the object 307 is shortened, only the received light spot on the sensor of the second CCD 302 extends outside it. This is so because, as indicated by equation (2) and equation (3) below, the moving amount x2 of the received light image on the second CCD 302 is larger than the moving amount x1 of the received light image on the first CCD 301. EQU x1=(K.times.f)/H (2) EQU x2=((K+B).times.f)/H (3)